import request from '@/utils/request'

export default {

  getAllArticle(current, size, { articleQuery }) {
    return request({
      url: `/api/articles/getArticles`,
      method: 'post',
      params: {
        current,
        size
      },
      data: articleQuery || {}
    })
  },

  publishArticle(data) {
    return request({
      url: `/api/articles/publishArticle`,
      method: 'post',
      data
    })
  },

  getArticleById(articleId) {
    return request({
      url: `/api/articles/articleInfo/${articleId}`,
      method: 'get'
    });
  }
}
